#include <iostream>
using namespace std;
void foo(int num, double num2);
void foo(double num, int num2);
void foo(double num);
void foo(int num, int num2);
int main()
{
    // 函数重载
    // 1、参数类型
    // 2、参数数量
    // 3、参数顺序
    foo(1, 1.0);
    foo(1.2, 1);
    foo(1);
    foo(1, 1);
    return 0;
}

void foo(int num, double num2)
{
    cout << "foo11" << endl;
    cout << "int num is " << num << endl;
    cout << "double num is " << num << endl;
}
void foo(double num, int num2)
{
    cout << "foo22" << endl;
    cout << "int num is " << num << endl;
    cout << "double num is " << num << endl;
}

void foo(double num)
{
    cout << "foo33" << endl;
    cout << "double num is " << num << endl;
}

void foo(int num, int num2)
{
    cout << "foo44" << endl;
    cout << "int num is " << num << endl;
    cout << "int num2 is " << num2 << endl;
}